CSE 444 Midterm
Autumn 2000
Solutions
2. a. AB+ = ABM
b. AC+ = ACMNS
c. BC+ = BCMNSAD
d.
The following instance is such an example:
A |
B |
C |
D |
M |
N |
S |
a |
b1 |
c |
d1 |
m |
n |
s |
a |
b2 |
c |
d2 |
m |
n |
s |
3. a.
b. i.
Select distinct url
From WebPage
Where “Old English” = ALL (select origin
From Contains, Dictionary
Where url=pageUrl AND dictWord = word)
ii.
Select author
From WebPage, Contains
Where url=pageUrl
Group By author
Having count(distinct dictWord) >= 10000
iii.
select x.url, y.url
from Contains x, Contains y
where x.dictWord = y.dictWord
group by x.url, y.url
having count(distinct x.dictWord) >= 50
4.
<memories>
<party> <date>1999</date>
<person> <name>John</name>
<email>j@partygoers.org </email>
</person>
<person> <name>Jim</name>
</person>
<person> <name> Mary </name>
<phone>555-1234</phone>
<email>m@partygoers.org</email>
</person>
</party>
<party> <date>2000</date>
<date>2001</date>
<everybody>
</everybody>
</party>
<party><person><name>John</name>
<phone>555-2345</phone>
</person>
<everybody>
</everybody>
</party>
</memories>